package com.lingkang.sales.data.domain;

import java.util.Collection;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

/**
 * @author linke
 * @date 2020/11/14 21:09
 * @description 自定义security中的user（org.springframework.security.core.userdetails.User）
 */
@Getter
@Setter
@ToString
public class SecUser extends User {

  public SecUser(String username, String password,
      Collection<? extends GrantedAuthority> authorities) {
    super(username, password, authorities);
  }

  public SecUser(String username, String password, boolean enabled, boolean accountNonExpired,
      boolean credentialsNonExpired, boolean accountNonLocked,
      Collection<? extends GrantedAuthority> authorities) {
    super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked,
        authorities);
  }

  private String username;
  private String nickname;
  private String sex;
  //归属公司代码
  private String comCode;
  //归属公司名称
  private String comName;
  //归属机构等级
  private Integer comLevel;
  //上层机构
  private String updateCode;
  //省级代码
  private String provinceCode;
}
